<template>
  <div class="app-container">
    <el-tabs v-model="activeName" type="border-card">
      <el-tab-pane label="满意度主题" name="1">
        <satisfaction-theme :type="type" v-if="activeName == 1"></satisfaction-theme>
      </el-tab-pane>
      <el-tab-pane label="满意度问题" name="2">
        <satisfaction-issue :type="type" v-if="activeName == 2"></satisfaction-issue>
      </el-tab-pane>
      <el-tab-pane label="调查结果" name="3">
        <survey-results :type="type" v-if="activeName == 3"></survey-results>
      </el-tab-pane>
      <el-tab-pane label="员工投诉" name="4" v-if="type == 1">
        <staff-complaint :type="type" v-if="activeName == 4"></staff-complaint>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
// 满意度主题
import satisfactionTheme from './satisfactionTheme.vue';
// 满意度问题
import satisfactionIssue from './satisfactionIssue.vue'
// 调查结果
import surveyResults from './surveyResults.vue';
// 员工投诉
import staffComplaint from './staffComplaint.vue'
export default {
  name: "index",
  components: {
    satisfactionTheme,
    satisfactionIssue,
    surveyResults,
    staffComplaint
  },
  data() {
    return {
      activeName: '1',
      type: this.$route.query.type
    };
  },
  created() {
  },
  methods: {
  }
};
</script>
